﻿//==============================================================================  
//Copyright (C) 2012-2015 9UN.ORG. All rights reserved. 
//GUID：581ba509-5ed3-4c43-8371-404956d29646
//CLR Version: 4.0.30319.18033
//Code Author：Kevin Wang
//Contact：Email(Admin@9un.org),QQ(265382 or 74344)
//Filename：IPlayer
//Namespace：RuanRang.Media.Core
//Functions：IPlayer  
//Created by Kevin Wang at 2013/3/3 23:16:11 http://blog.9un.org
//============================================================================== 

using System;
using RuanRang.Media.Core.Common;
using RuanRang.Media.Core.Internal;
using RuanRang.Media.Core.Io;
using RuanRang.Media.Core.Media;

namespace RuanRang.Media.Core
{
    public interface IMediaPlayer
    {
        /// <summary>
        /// Gets the state.
        /// </summary>
        /// <value>The state.</value>
        VlcPlayerState State { get; }

        /// <summary>
        /// Gets or sets the position.
        /// </summary>
        /// <value>The position.</value>
        float Position { get; set; }

        /// <summary>
        /// Gets or sets a value indicating whether this instance is full screen.
        /// </summary>
        /// <value><c>true</c> if this instance is full screen; otherwise, <c>false</c>.</value>
        bool IsFullScreen { get; set; }

        /// <summary>
        /// Gets or sets the time.
        /// </summary>
        /// <value>The time.</value>
        TimeSpan Time { get; set; }

        /// <summary>
        /// Gets or sets the volume.
        /// </summary>
        /// <value>The volume.</value>
        int Volume { get; set; }

        /// <summary>
        /// Plays this instance.
        /// </summary>
        void Play();

        /// <summary>
        /// Plays the specified media input.
        /// </summary>
        /// <param name="mediaInput">The media input.</param>
        void Play(MediaInput mediaInput);

        /// <summary>
        /// Stops this instance.
        /// </summary>
        void Stop();

        /// <summary>
        /// Pauses this instance.
        /// </summary>
        void Pause();

        /// <summary>
        /// Resumes this instance.
        /// </summary>
        void Resume();

        /// <summary>
        /// Plays the next.
        /// </summary>
        void Forward();

        /// <summary>
        /// Backwards this instance.
        /// </summary>
        void Backward();

        /// <summary>
        /// Parses the media input.
        /// </summary>
        /// <param name="mediaInput">The media input.</param>
        /// <returns>PreparsedMedia.</returns>
        BaseMedia ParseMediaInput(MediaInput mediaInput);

        /// <summary>
        /// Sets the media input.
        /// </summary>
        /// <param name="mediaInput">The media input.</param>
        void SetMediaInput(MediaInput mediaInput);

        /// <summary>
        /// Sets the media input.
        /// </summary>
        /// <param name="preparsedMedia">The preparsed media.</param>
        void SetMediaInput(BaseMedia preparsedMedia);

        /// <summary>
        /// Sets the next media input.
        /// </summary>
        /// <param name="mediaInput">The media input.</param>
        void SetNextMediaInput(MediaInput mediaInput);

        /// <summary>
        /// Sets the next media input.
        /// </summary>
        /// <param name="preparsedMedia">The preparsed media.</param>
        void SetNextMediaInput(BaseMedia preparsedMedia);

        /// <summary>
        /// Sets the video adjust.
        /// </summary>
        /// <param name="option">The option.</param>
        /// <param name="value">The value.</param>
        void SetVideoAdjust(VideoAdjustOption option, object value);

        /// <summary>
        /// Gets the video adjust.
        /// </summary>
        /// <param name="option">The option.</param>
        /// <returns>System.Object.</returns>
        object GetVideoAdjust(VideoAdjustOption option);

        /// <summary>
        /// Setvideoes the aspect ratio.
        /// </summary>
        /// <param name="videoAspectRatioType">Type of the video aspect ratio.</param>
        void SetvideoAspectRatio(VideoAspectRatioType videoAspectRatioType);

        /// <summary>
        /// Getvideoes the aspect ratio.
        /// </summary>
        /// <returns>System.String.</returns>
        string GetvideoAspectRatio();

        /// <summary>
        /// Gets the size of the video.
        /// </summary>
        /// <param name="width">The width.</param>
        /// <param name="height">The height.</param>
        /// <returns><c>true</c> if XXXX, <c>false</c> otherwise</returns>
        bool GetVideoSize(out uint width, out uint height);

        /// <summary>
        /// Sets the video logo.
        /// </summary>
        /// <param name="option">The option.</param>
        /// <param name="vlaue">The vlaue.</param>
        void SetVideoLogo(VideoLogoOption option, object vlaue);

        /// <summary>
        /// Takes the snapshot.
        /// </summary>
        /// <param name="filePath">The file path.</param>
        /// <param name="width">The width.</param>
        /// <param name="height">The height.</param>
        void TakeSnapshot(string filePath, int width, int height);

        /// <summary>
        /// Adds the media option.
        /// </summary>
        /// <param name="option">The option.</param>
        void AddMediaOption(string option);

        /// <summary>
        /// Gets the spu description.
        /// </summary>
        void GetSpuDescription();
    }
}
